<?php

namespace addons\TfFutures\common\models;

use common\models\sys\Manager;
use Yii;

/**
 * This is the model class for table "rf_addon_tf_futures_daili_withdraw".
 *
 * @property int $id
 * @property int $member_id 用户id
 * @property string $money 提现金额
 * @property int $status 审核状态 1通过 0 待审核  1未通过
 * @property string $created_at 审核时间
 * @property int $ctrl_uid 审核人员
 * @property string $updated_at 审核操作时间
 */
class DailiWithdraw extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'rf_addon_tf_futures_daili_withdraw';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['member_id', 'money'], 'required'],
            [['member_id', 'status', 'ctrl_uid'], 'integer'],
            [['money'], 'number'],
            [['created_at', 'updated_at'], 'safe'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'member_id' => '用户id',
            'money' => '提现金额',
            'status' => '审核状态 1通过 0 待审核  1未通过',
            'created_at' => '审核时间',
            'ctrl_uid' => '审核人员',
            'updated_at' => '审核操作时间',
        ];
    }

    public function getManager(){
        return $this->hasOne(Manager::className(),['id'=>'member_id']);
    }
}
